import pymysql
from fastapi import FastAPI,HTTPException,Form
app=FastAPI()
db={
    "host":"127.0.0.1",
    "password":"123456",
    "database":"2305a",
    "user":"root",
    "charset":"utf8"
}
@app.post('/change')
def zc(
    id:str=Form(...),
    name:str=Form(...),
    password:str=Form(...)
):
    
    con=pymysql.connect(**db)
    cur=con.cursor()
    
    cur.execute('update student set name=%s where id=%s',(name,id))
    